From a4ae2783362a79fd9f541a0f45c41de8757aa66e Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 4 Jan 2022 13:36:18 +0100
Subject: refactor: avoid mutated array with reverse method

---
 src/pages/thematique/[slug].tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/pages/thematique/[slug].tsx')

diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx
index 51506e5..74c2212 100644
--- a/src/pages/thematique/[slug].tsx
+++ b/src/pages/thematique/[slug].tsx
@@ -14,7 +14,7 @@ import {
 
 const Thematic: NextPageWithLayout<ThematicProps> = ({ thematic }) => {
   const getPostsList = () => {
-    return thematic.posts.reverse().map((post) => (
+    return [...thematic.posts].reverse().map((post) => (
       <li key={post.id} className={styles.item}>
         <PostPreview post={post} titleLevel={3} />
       </li>
-- 
cgit v1.2.3

